.container
    .panel.panel-default(ng-repeat="group in ::settingsGroups")
        .panel-heading
            h3.panel-title
                | {{group.caption}}
        .panel-body
            form(name="{{ group.name }}")
                div(ng-repeat="item in group.items")
                    div.col-md-12(ng-switch="", on="item.type")
                        .form-group(ng-switch-when="bool")
                            label.checkbox-inline
                                input(type="checkbox" name="{{item.name}}" ng-model="item.value" ng-value="item.value")
                                | {{ item.caption }}
                        form-group(ng-switch-when="choices")
                            div(ng-repeat="answer in item.answers")
                                label.radio-inline
                                    input(type="radio" name="{{group.name + '_' + answer.name}}" ng-model="item.value" ng-value="answer.name")
                                    | {{ answer.name }}
                        .form-group(ng-switch-when="integer")
                            label {{ item.caption }}
                            input.form-control(type="number" name="{{item.name}}" ng-model="item.value")
                        .form-group(ng-switch-when="text")
                            label {{ item.caption }}
                            input.form-control(type="text" name="{{item.name}}" ng-model="item.value")
                        .alert.alert-danger(ng-switch-default) bad item type: {{item.type}} should be one of: bool, choices, integer, text

    .panel.panel-default
        .panel-heading
            h3.panel-title
                | Override defaults for all users
        .panel-body
            p To override defaults for all users, put following code in master.cfg
            pre
                | {{master_cfg_override_snippet}}
